﻿using Core.SimpleTemp.Common;
using Core.SimpleTemp.Entitys;
using Core.Toolkit.Core.Application;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace Core.SimpleTemp.Application.UserApp
{
    [CreateMap(typeof(SysUser))]
    public class SysUserDto : Dto
    {

        #region 基础字段
        /// <summary>
        /// 登录名
        /// </summary>
        [StringLength(30)]
        public string LoginName { get; set; }
        /// <summary>
        /// 登录密码
        /// </summary>
        [StringLength(32)]
        public string Password { get; set; }
        /// <summary>
        /// 用户名
        /// </summary>
        [StringLength(30)]
        public string Name{ get; set; }
        /// <summary>
        /// 最后登录时间
        /// </summary>

        [DataType(DataType.DateTime)]
        public DateTime LastUpdate { get; set; }

        /// <summary>
        /// 状态 正常/停用
        /// </summary>
        public byte State { get; set; }

        #endregion

        #region 关系表
        public SysUserInforDto SysUserInfor { get; set; }

        public virtual ICollection<SysUserDutyDto> SysUseDuties { get; set; }
        public virtual ICollection<Guid> DutyList { get; set; }
        #endregion
        public virtual ICollection<Guid> RoleIdList { get; set; }
       
    }
}
